<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Collision Checker: cpp/collision/src/serialize/serialize_container_obj_obj.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Collision Checker
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_df511e5bd85cec96854b39d5e1c27aa8.html">cpp</a></li><li class="navelem"><a class="el" href="dir_bf0f0c8865c1942e08ab5157e2c596db.html">collision</a></li><li class="navelem"><a class="el" href="dir_0bc2acc18702bc40f3a0aa3bc19285f7.html">src</a></li><li class="navelem"><a class="el" href="dir_ff67b0b1975c78e2aeeef391b01d4332.html">serialize</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">serialize_container_obj_obj.cc</div>  </div>
</div><!--header-->
<div class="contents">
<a href="serialize__container__obj__obj_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//*  Author: Vitaliy Rusinov</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="serialize_8h.html">collision/serialize/serialize.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#if ENABLE_SERIALIZER</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="broadphase__failure_8h.html">tests/collision/online_tests/broadphase_failure.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision.html">collision</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">serialize</a> {</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a8e5c13ff217fdeb67fc8263f62d5a7a7">BroadphaseFailure_obj_objExport::BroadphaseFailure_obj_objExport</a>(<span class="keywordtype">void</span>) {}</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a8e5c13ff217fdeb67fc8263f62d5a7a7">BroadphaseFailure_obj_objExport::BroadphaseFailure_obj_objExport</a>(</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    <span class="keyword">const</span> test::BroadphaseFailureObjObj &amp;<span class="keywordtype">object</span>) {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a> = object;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;}</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a7943d16fab0530afb5fe5febc601e10a">BroadphaseFailure_obj_objExport::~BroadphaseFailure_obj_objExport</a>(<span class="keywordtype">void</span>) {}</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">const</span> test::BroadphaseFailure *</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a388aa830c669354f8a2b14cd51eb5701">BroadphaseFailure_obj_objExport::getFailure</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  <span class="keywordflow">return</span> &amp;<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a>;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;}</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#af9d2918042a7b4bb6bf78c0d091ed367">BroadphaseFailure_obj_objExport::operator()</a>(</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    s11nlite::node_type &amp;dest)<span class="keyword"> const </span>{</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <span class="keyword">typedef</span> s11nlite::node_traits TR;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  TR::class_name(dest, <span class="stringliteral">&quot;BroadphaseFailure_obj_objExport&quot;</span>);</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a>.<a class="code" href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#afcd72ffa07c854fe1858c1c0add8df65">obj1</a>.get() || !<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a>.<a class="code" href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#a1453973ff1850a972864f9a0c0b2dba2">obj2</a>.get()) {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  }</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  std::shared_ptr&lt;ICollisionObjectExport_s11&gt; obj1_exp(</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;      static_cast&lt;ICollisionObjectExport_s11 *&gt;(<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a>.<a class="code" href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#afcd72ffa07c854fe1858c1c0add8df65">obj1</a>-&gt;exportThis()));</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  std::shared_ptr&lt;ICollisionObjectExport_s11&gt; obj2_exp(</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;      static_cast&lt;ICollisionObjectExport_s11 *&gt;(<a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a>.<a class="code" href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#a1453973ff1850a972864f9a0c0b2dba2">obj2</a>-&gt;exportThis()));</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="keywordflow">if</span> (!obj1_exp.get() || !obj2_exp.get()) {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  }</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="keywordtype">bool</span> res = <span class="keyword">true</span>;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  res = res &amp;&amp; s11nlite::serialize_subnode(dest, <span class="stringliteral">&quot;obj1&quot;</span>, obj1_exp.get());</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  res = res &amp;&amp; s11nlite::serialize_subnode(dest, <span class="stringliteral">&quot;obj2&quot;</span>, obj2_exp.get());</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;}</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#af9d2918042a7b4bb6bf78c0d091ed367">BroadphaseFailure_obj_objExport::operator()</a>(</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keyword">const</span> s11nlite::node_type &amp;src) {</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="keyword">typedef</span> s11nlite::node_traits TR;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="keyword">const</span> s11nlite::node_type *obj1_node = s11n::find_child_by_name(src, <span class="stringliteral">&quot;obj1&quot;</span>);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="keyword">const</span> s11nlite::node_type *obj2_node = s11n::find_child_by_name(src, <span class="stringliteral">&quot;obj2&quot;</span>);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <span class="keywordflow">if</span> (!obj1_node || !obj2_node) {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="comment">// CERR &lt;&lt; &quot;Deser of &#39;base&#39; member failed: node not found!\n&quot;;</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  }</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  std::shared_ptr&lt;ICollisionObjectExport_s11&gt; obj1_imp(</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      s11nlite::deserialize&lt;ICollisionObjectExport_s11&gt;(*obj1_node));</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  std::shared_ptr&lt;ICollisionObjectExport_s11&gt; obj2_imp(</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      s11nlite::deserialize&lt;ICollisionObjectExport_s11&gt;(*obj2_node));</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keywordflow">if</span> (!obj1_imp.get() || !obj2_imp.get()) {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">collision::CollisionObjectConstPtr</a> obj1_ptr(obj1_imp.get()-&gt;loadObject());</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">collision::CollisionObjectConstPtr</a> obj2_ptr(obj2_imp.get()-&gt;loadObject());</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="keywordflow">if</span> (!obj1_ptr.get() || !obj2_ptr.get()) {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  }</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a>.<a class="code" href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#afcd72ffa07c854fe1858c1c0add8df65">obj1</a> = obj1_ptr;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">m_object</a>.<a class="code" href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#a1453973ff1850a972864f9a0c0b2dba2">obj2</a> = obj2_ptr;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;}</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;} <span class="comment">// namespace serialize</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;} <span class="comment">// namespace collision</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="broadphase__failure_8h_html"><div class="ttname"><a href="broadphase__failure_8h.html">broadphase_failure.h</a></div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export_html_af9d2918042a7b4bb6bf78c0d091ed367"><div class="ttname"><a href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#af9d2918042a7b4bb6bf78c0d091ed367">collision::serialize::BroadphaseFailure_obj_objExport::operator()</a></div><div class="ttdeci">virtual bool operator()(s11nlite::node_type &amp;dest) const</div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export_html_a388aa830c669354f8a2b14cd51eb5701"><div class="ttname"><a href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a388aa830c669354f8a2b14cd51eb5701">collision::serialize::BroadphaseFailure_obj_objExport::getFailure</a></div><div class="ttdeci">const test::BroadphaseFailure * getFailure(void) const</div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export_html_a8e5c13ff217fdeb67fc8263f62d5a7a7"><div class="ttname"><a href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a8e5c13ff217fdeb67fc8263f62d5a7a7">collision::serialize::BroadphaseFailure_obj_objExport::BroadphaseFailure_obj_objExport</a></div><div class="ttdeci">BroadphaseFailure_obj_objExport(void)</div></div>
<div class="ttc" id="serialize_8h_html"><div class="ttname"><a href="serialize_8h.html">serialize.h</a></div></div>
<div class="ttc" id="namespacecollision_html_a405f2c04407997fea529aad88f04ad30"><div class="ttname"><a href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">collision::CollisionObjectConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const CollisionObject &gt; CollisionObjectConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00041">collision_object.h:41</a></div></div>
<div class="ttc" id="namespacecollision_html"><div class="ttname"><a href="namespacecollision.html">collision</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00020">collision_checker.h:20</a></div></div>
<div class="ttc" id="classcollision_1_1test_1_1_broadphase_failure_obj_obj_html_a1453973ff1850a972864f9a0c0b2dba2"><div class="ttname"><a href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#a1453973ff1850a972864f9a0c0b2dba2">collision::test::BroadphaseFailureObjObj::obj2</a></div><div class="ttdeci">CollisionObjectConstPtr obj2</div><div class="ttdef"><b>Definition:</b> <a href="broadphase__failure_8h_source.html#l00015">broadphase_failure.h:15</a></div></div>
<div class="ttc" id="classcollision_1_1test_1_1_broadphase_failure_obj_obj_html_afcd72ffa07c854fe1858c1c0add8df65"><div class="ttname"><a href="classcollision_1_1test_1_1_broadphase_failure_obj_obj.html#afcd72ffa07c854fe1858c1c0add8df65">collision::test::BroadphaseFailureObjObj::obj1</a></div><div class="ttdeci">CollisionObjectConstPtr obj1</div><div class="ttdef"><b>Definition:</b> <a href="broadphase__failure_8h_source.html#l00014">broadphase_failure.h:14</a></div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export_html_a6e340a4d977ba19e560a8999dc032313"><div class="ttname"><a href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a6e340a4d977ba19e560a8999dc032313">collision::serialize::BroadphaseFailure_obj_objExport::m_object</a></div><div class="ttdeci">test::BroadphaseFailureObjObj m_object</div><div class="ttdef"><b>Definition:</b> <a href="broadphase__failure__obj__obj__export_8h_source.html#l00020">broadphase_failure_obj_obj_export.h:20</a></div></div>
<div class="ttc" id="namespacecollision_1_1serialize_html_aea63e6d672588912102de4dbfc13ba19"><div class="ttname"><a href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">collision::serialize::serialize</a></div><div class="ttdeci">int serialize(const test::BroadphaseFailureCCObj &amp;bf_object, std::ostream &amp;output_stream, const char *format=SERIALIZER_DEFAULT_FORMAT)</div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export_html_a7943d16fab0530afb5fe5febc601e10a"><div class="ttname"><a href="classcollision_1_1serialize_1_1_broadphase_failure__obj__obj_export.html#a7943d16fab0530afb5fe5febc601e10a">collision::serialize::BroadphaseFailure_obj_objExport::~BroadphaseFailure_obj_objExport</a></div><div class="ttdeci">virtual ~BroadphaseFailure_obj_objExport(void)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
